<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../../img/favicons/favicon.ico">

    <title>Dashboard Template for Bootstrap</title>

    <link rel="canonical" href="https://getbootstrap.com/docs/4.0/examples/dashboard/">

    <!-- Bootstrap core CSS -->
    <link href="../../css/bootstrap.min.css" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link href="../../css/dashboard.css" rel="stylesheet">
</head>

<body>
<nav class="navbar navbar-dark sticky-top bg-dark flex-md-nowrap p-0">
    <a class="navbar-brand col-sm-3 col-md-2 mr-0" href="#" th:text="'当前登录用户：'+${session.username}"></a>
    <input class="form-control form-control-dark w-100" type="text" placeholder="Search" aria-label="Search">
    <ul class="navbar-nav px-3">
        <li class="nav-item text-nowrap">
            <a class="nav-link" href="/signOut">退出登录</a>
        </li>
    </ul>
</nav>

<div class="container-fluid">
    <div class="row">

        <div th:insert="~{common::sidebar(active='/toEvaluates')}"></div>

        <main role="main" class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4">
            <h3>用户评价</h3>
            <h5 th:text="${msg}"></h5>
            <p></p>
            <p></p>
            <table class="table table-hover">
                <thead>
                <tr>
                    <th style="text-align: center;vertical-align:middle">商品</th>
                    <th style="text-align: center;vertical-align:middle">缩略图</th>
                    <th style="text-align: center;vertical-align:middle">评价用户</th>
                    <th style="text-align: center;vertical-align:middle">内容</th>
                </tr>
                </thead>
                <tbody>
                <!---->
                    <tr th:each="lists:${evaluates}">
                        <td style="text-align: center;vertical-align:middle" th:text="${lists.getPname()}"></td>
                        <td style="text-align: center;vertical-align:middle"><img th:src="${lists.getUrl()}" width="100px"></td>
                        <td style="text-align: center;vertical-align:middle" th:text="${lists.getUsername()}"></td>
                        <td style="text-align: center;vertical-align:middle" th:text="${lists.getEvaluate()}" width="50%"></td>
                    </tr>
                </tbody>
            </table>
        </main>


    </div>
</div>

<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script>window.jQuery || document.write('<script src="${pageContext.request.contextPath}../../js/vendor/jquery-slim.min.js"><\/script>')</script>
<script src="${pageContext.request.contextPath}../../js/vendor/popper.min.js"></script>
<script src="${pageContext.request.contextPath}../../js/bootstrap.min.js"></script>

<!-- Icons -->
<script src="https://unpkg.com/feather-icons/dist/feather.min.js"></script>
<script>
    feather.replace()
</script>

<!-- Graphs -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.1/Chart.min.js"></script>
<script>
    var ctx = document.getElementById("myChart");
    var myChart = new Chart(ctx, {
        type: 'line',
        data: {
            labels: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
            datasets: [{
                data: [15339, 21345, 18483, 24003, 23489, 24092, 12034],
                lineTension: 0,
                backgroundColor: 'transparent',
                borderColor: '#007bff',
                borderWidth: 4,
                pointBackgroundColor: '#007bff'
            }]
        },
        options: {
            scales: {
                yAxes: [{
                    ticks: {
                        beginAtZero: false
                    }
                }]
            },
            legend: {
                display: false,
            }
        }
    });
</script>
</body>
</html>
